<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="ps切图," />





  <link rel="alternate" href="/atom.xml" title="OBKoro1's Blog" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.2" />






<meta name="description" content="写在前面：本文主要内容是目前我所知道的切图技巧结合网上的资料，写出来分享一波。图文教程，多图！！ BB：很多人都会说，切图这个活倒底分给UI还是分给前端。虽然好的UI会给我们把图切好，但是他们切的图不一定百分之百符合我们的需求，所以我一直都觉得这是页面仔必须要会的一项技能，因为只有你自己才会知道怎么切合适。况且这项技能根本一点都不难，所以还是自己动手丰衣足食比较好。 1.下载我现在使用的版本号：P">
<meta name="keywords" content="ps切图">
<meta property="og:type" content="article">
<meta property="og:title" content="前端 PS 切图方法，图文详细">
<meta property="og:url" content="http://yoursite.com/2017/10/11/前端-PS-切图方法，图文详细/index.html">
<meta property="og:site_name" content="OBKoro1&#39;s Blog">
<meta property="og:description" content="写在前面：本文主要内容是目前我所知道的切图技巧结合网上的资料，写出来分享一波。图文教程，多图！！ BB：很多人都会说，切图这个活倒底分给UI还是分给前端。虽然好的UI会给我们把图切好，但是他们切的图不一定百分之百符合我们的需求，所以我一直都觉得这是页面仔必须要会的一项技能，因为只有你自己才会知道怎么切合适。况且这项技能根本一点都不难，所以还是自己动手丰衣足食比较好。 1.下载我现在使用的版本号：P">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_1.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_2.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_3.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_4.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_5.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_6.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_7.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_8.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_9.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_10.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_11.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_12.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_13.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_14.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_15.png">
<meta property="og:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_16.png">
<meta property="og:updated_time" content="2019-06-15T06:19:47.649Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="前端 PS 切图方法，图文详细">
<meta name="twitter:description" content="写在前面：本文主要内容是目前我所知道的切图技巧结合网上的资料，写出来分享一波。图文教程，多图！！ BB：很多人都会说，切图这个活倒底分给UI还是分给前端。虽然好的UI会给我们把图切好，但是他们切的图不一定百分之百符合我们的需求，所以我一直都觉得这是页面仔必须要会的一项技能，因为只有你自己才会知道怎么切合适。况且这项技能根本一点都不难，所以还是自己动手丰衣足食比较好。 1.下载我现在使用的版本号：P">
<meta name="twitter:image" content="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_1.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.2',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2017/10/11/前端-PS-切图方法，图文详细/"/>





  <title>前端 PS 切图方法，图文详细 | OBKoro1's Blog</title>
  





  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?64d57d0b926bbd27431daa89d2e0a76b";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">OBKoro1's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-前端算法">
          <a href="/arithmetic/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-book"></i> <br />
            
            前端算法
          </a>
        </li>
      
        
        <li class="menu-item menu-item-博客最新更新">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            博客最新更新
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-commonweal">
          <a href="/404/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-heartbeat"></i> <br />
            
            公益404
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/10/11/前端-PS-切图方法，图文详细/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="OBKoro1">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/uploads/hand1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="OBKoro1's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">前端 PS 切图方法，图文详细</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-10-11T22:19:42+08:00">
                2017-10-11
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/工具类/" itemprop="url" rel="index">
                    <span itemprop="name">工具类</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          
             <span id="/2017/10/11/前端-PS-切图方法，图文详细/" class="leancloud_visitors" data-flag-title="前端 PS 切图方法，图文详细">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数&#58;</span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  1,207 字
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  4分钟
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p><strong>写在前面：</strong>本文主要内容是目前<strong>我所知道的切图技巧结合网上的资料</strong>，写出来分享一波。图文教程，多图！！</p>
<p><strong>BB：</strong>很多人都会说，切图这个活倒底分给UI还是分给前端。虽然好的UI会给我们把图切好，但是他们切的图不一定百分之百符合我们的需求，所以我一直都觉得这是页面仔必须要会的一项技能，因为只有你自己才会知道怎么切合适。况且<strong>这项技能根本一点都不难</strong>，所以还是自己动手丰衣足食比较好。</p>
<h2 id="1-下载"><a href="#1-下载" class="headerlink" title="1.下载"></a>1.下载</h2><p>我现在使用的版本号：PS-CS6，网上很多破解版本的自行搜索下载。</p>
<h2 id="2-安装好PS之后，先要调整工作区域的布局。"><a href="#2-安装好PS之后，先要调整工作区域的布局。" class="headerlink" title="2.安装好PS之后，先要调整工作区域的布局。"></a>2.安装好PS之后，先要调整工作区域的布局。</h2><p>1.选择“窗口”——把“信息”，“图层”，“历史记录”，“颜色”面板打开，其他的可以先关闭了，在切图的工作中其他的基本用不到，这个很简单的，<strong>打几个勾就可以了</strong>，如下图所示：</p>
<p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_1.png" alt="Paste_Image.png"></p>
<p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_2.png" alt="工作区的内容"></p>
<p>2.调整好面板之后，选择“窗口”——“工作区”——“新建工作区”，<strong>将当前的工作布局保存</strong>起来，并命个名，之后下次打开的时候就会直接出现你调整好的工作布局，否则的话你每次重新打开ps的时候都要重新设置。</p>
<p>ps：就算有别人弄乱了你的面板也可以直接通过“窗口”——“工作区”——选择你之前保存的工作布局。</p>
<h2 id="3-切图"><a href="#3-切图" class="headerlink" title="3.切图"></a><strong>3.切图</strong></h2><p>切图需求：</p>
<p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_3.png" alt="这是我们需要切的图"></p>
<h4 id="切图步骤见图"><a href="#切图步骤见图" class="headerlink" title="切图步骤见图"></a>切图步骤见图</h4><p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_4.png" alt="切图步骤1."></p>
<h4 id="选择图层的时候要先按住alt不放，然后再按鼠标右键。"><a href="#选择图层的时候要先按住alt不放，然后再按鼠标右键。" class="headerlink" title="选择图层的时候要先按住alt不放，然后再按鼠标右键。"></a>选择图层的时候要先按住alt不放，然后再按鼠标右键。</h4><p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_5.png" alt="Paste_Image.png"></p>
<h3 id="隐藏图层。"><a href="#隐藏图层。" class="headerlink" title="隐藏图层。"></a>隐藏图层。</h3><p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_6.png" alt="Paste_Image.png"></p>
<p>效果：</p>
<p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_7.png" alt="Paste_Image.png"></p>
<h4 id="连续操作隐藏图层-背景图要隐藏干净-："><a href="#连续操作隐藏图层-背景图要隐藏干净-：" class="headerlink" title="连续操作隐藏图层(背景图要隐藏干净)："></a>连续操作隐藏图层(<strong>背景图要隐藏干净</strong>)：</h4><h4 id="效果，以及接下的步骤（切线就是一根根淡蓝色的线）"><a href="#效果，以及接下的步骤（切线就是一根根淡蓝色的线）" class="headerlink" title="效果，以及接下的步骤（切线就是一根根淡蓝色的线）"></a>效果，以及接下的步骤（切线就是一根根淡蓝色的线）</h4><p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_8.png" alt="Paste_Image.png"></p>
<h4 id="保存切片1"><a href="#保存切片1" class="headerlink" title="保存切片1"></a>保存切片1</h4><p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_9.png" alt="Paste_Image.png"></p>
<h4 id="保存切片2"><a href="#保存切片2" class="headerlink" title="保存切片2"></a>保存切片2</h4><p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_10.png" alt="Paste_Image.png"></p>
<h4 id="保存切片3"><a href="#保存切片3" class="headerlink" title="保存切片3"></a>保存切片3</h4><p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_11.png" alt="Paste_Image.png"></p>
<p>被局限的方法（原理是一样的）：</p>
<p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_12.png" alt="这有局限"></p>
<h1 id="踩坑经历："><a href="#踩坑经历：" class="headerlink" title="踩坑经历："></a>踩坑经历：</h1><p>网上很多教程都说使用png格式就可以，却并没有说png-8或者是png-24，甚至有些教程告诉我使用png-8！在这里分享一波，保存切片<strong>必须使用png-24</strong>，因为我踩过坑了（/(ㄒoㄒ)/~~）</p>
<h4 id="切出来的图片对比："><a href="#切出来的图片对比：" class="headerlink" title="切出来的图片对比："></a>切出来的图片对比：</h4><p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_13.png" alt="Paste_Image.png"></p>
<h4 id="网页效果对比："><a href="#网页效果对比：" class="headerlink" title="网页效果对比："></a>网页效果对比：</h4><p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_14.png" alt=""></p>
<h4 id="更新一波原理："><a href="#更新一波原理：" class="headerlink" title="更新一波原理："></a>更新一波原理：</h4><p>之前不知道为什么png8，png24为什么有这种差别，经过评论区@唐挽斐 解答一波，现在明白了，更新到文章里面。</p>
<p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_15.png" alt=""></p>
<p>因为黄色图标这里是不透明的，png8不支持半透明的</p>
<p><img src="https://raw.githubusercontent.com/OBKoro1/article-demo/master/blogImg/2017_4_9_16.png" alt=""></p>
<h4 id="搜了一下png8和png-24的区别："><a href="#搜了一下png8和png-24的区别：" class="headerlink" title="搜了一下png8和png-24的区别："></a>搜了一下png8和png-24的区别：</h4><p>1、png8是一个256色的图片，png24则是一个1670万色的图片</p>
<p>2、png8的压缩率比png24高很多，所以<strong>png8图片的大小会比png24小很多</strong>。</p>
<p>3、png8的全透明没有png24的质量高。</p>
<p>4、png8在半透明和透明的情况下会有毛边锯齿的现象，png24则不会，如下图</p>
<p><strong>@唐挽斐建议</strong>：必须保存png24，这个确实可以保证图片不会出错，但是对于大的不需要半透明的图片保存成 png24 的话<strong>导致文件体积会很大</strong>，所以建议不需要半透明的图片保存成 png8，这样体积会小一点而且不会影响图片清晰度，需要半透明的一定要保存成 png24。</p>
<p>感谢建议，之前有点不太理解，这回学习到了。</p>
<p>这是别人写的教程，跟我用的方法有些差别，有兴趣可以看看。<br><a href="http://blog.csdn.net/xiaoermingn/article/details/53240266" target="_blank" rel="noopener">http://blog.csdn.net/xiaoermingn/article/details/53240266</a></p>
<p>以上：2017.4.9。</p>
<p><strong>后话：</strong> 本文的受众是前端小白们呢，只是帮助小白们，先学会切图能把图片切出来，能够使用就可以了，这些都是小技能学会用了就可以了，不打紧的。明天写一篇关于雪碧图的合成方法，以及关于切图的一些东西。</p>
<p>相关：<br>1.<a href="https://juejin.im/post/58eb062861ff4b006b576d9c" target="_blank" rel="noopener">css sprite雪碧图制作，使用以及相关，图文</a><br>2.<a href="https://juejin.im/post/58ec558d570c350057e849f0" target="_blank" rel="noopener">ps切图实用小技巧、图片格式的区别及相关内容</a></p>
<p><strong>最后又到了观众朋友们最喜欢的求赞求关注环节：</strong>希望看完的朋友点个喜欢，也可以关注一下我，现在这阶段基本上每个月都不会少于十五篇文章（看到干货我也会进行分享）。码字不易，感谢支持，感激不尽！<br><strong>ps</strong>：如果希望我写哪方面的文章可以在底下评论，或者是私信我，虽然写的不好，但我就当这是记录自己成长的一种方式咯。（前提是我会了，如果不会我也会记下来，等会了的时候再更出来。）<br><a href="http://www.jianshu.com/u/8d1dd8c80f06" target="_blank" rel="noopener"><em>**</em></a><strong><a href="https://juejin.im/user/58714f0eb123db4a2eb95372" target="_blank" rel="noopener">掘金个人主页</a>  ，</strong><a href="http://www.jianshu.com/u/8d1dd8c80f06" target="_blank" rel="noopener"><strong>简书主页链接</strong></a>，<strong><a href="http://blog.csdn.net/OBKoro1?skin=dark1" target="_blank" rel="noopener">csdn博客主页链接</a> ，<a href="https://github.com/OBKoro1" target="_blank" rel="noopener">github</a> 。</strong></p>

      
    </div>
    
    
    

    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>听说，打赏我的人最后都找到了真爱。</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/pay/weixin.jpg" alt="OBKoro1 微信支付"/>
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/pay/ali.jpg" alt="OBKoro1 支付宝"/>
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/ps切图/" rel="tag"><i class="fa fa-tag"></i> ps切图</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/10/11/标签栏图标，随机背景图，压缩背景/" rel="next" title="标签栏图标，随机背景图，压缩背景">
                <i class="fa fa-chevron-left"></i> 标签栏图标，随机背景图，压缩背景
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/10/11/css-sprite雪碧图制作，使用以及相关，图文gif/" rel="prev" title="css sprite雪碧图制作，使用以及相关，图文gif">
                css sprite雪碧图制作，使用以及相关，图文gif <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          
            <img class="site-author-image" itemprop="image"
              src="/uploads/hand1.jpg"
              alt="OBKoro1" />
          
            <p class="site-author-name" itemprop="name">OBKoro1</p>
            <p class="site-description motion-element" itemprop="description">种一棵树最好的时间是十年前,其次是现在</p>
        </div>

        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
            
              <a href="/archives">
            
                <span class="site-state-item-count">105</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/categories/index.html">
                <span class="site-state-item-count">20</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">74</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        
          <div class="feed-link motion-element">
            <a href="/atom.xml" rel="alternate">
              <i class="fa fa-rss"></i>
              RSS
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/OBKoro1" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>GitHub</a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://juejin.im/user/58714f0eb123db4a2eb95372" target="_blank" title="掘金">
                  
                    <i class="fa fa-fw fa-globe"></i>掘金</a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://obkoro1.com/web_accumulate/" target="_blank" title="前端积累">
                  
                    <i class="fa fa-fw fa-globe"></i>前端积累</a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://segmentfault.com/u/obkoro1/articles" target="_blank" title="segmentfault">
                  
                    <i class="fa fa-fw fa-globe"></i>segmentfault</a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-下载"><span class="nav-number">1.</span> <span class="nav-text">1.下载</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-安装好PS之后，先要调整工作区域的布局。"><span class="nav-number">2.</span> <span class="nav-text">2.安装好PS之后，先要调整工作区域的布局。</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-切图"><span class="nav-number">3.</span> <span class="nav-text">3.切图</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#切图步骤见图"><span class="nav-number">3.0.1.</span> <span class="nav-text">切图步骤见图</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#选择图层的时候要先按住alt不放，然后再按鼠标右键。"><span class="nav-number">3.0.2.</span> <span class="nav-text">选择图层的时候要先按住alt不放，然后再按鼠标右键。</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#隐藏图层。"><span class="nav-number">3.1.</span> <span class="nav-text">隐藏图层。</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#连续操作隐藏图层-背景图要隐藏干净-："><span class="nav-number">3.1.1.</span> <span class="nav-text">连续操作隐藏图层(背景图要隐藏干净)：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#效果，以及接下的步骤（切线就是一根根淡蓝色的线）"><span class="nav-number">3.1.2.</span> <span class="nav-text">效果，以及接下的步骤（切线就是一根根淡蓝色的线）</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#保存切片1"><span class="nav-number">3.1.3.</span> <span class="nav-text">保存切片1</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#保存切片2"><span class="nav-number">3.1.4.</span> <span class="nav-text">保存切片2</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#保存切片3"><span class="nav-number">3.1.5.</span> <span class="nav-text">保存切片3</span></a></li></ol></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#踩坑经历："><span class="nav-number"></span> <span class="nav-text">踩坑经历：</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#切出来的图片对比："><span class="nav-number">0.0.1.</span> <span class="nav-text">切出来的图片对比：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#网页效果对比："><span class="nav-number">0.0.2.</span> <span class="nav-text">网页效果对比：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#更新一波原理："><span class="nav-number">0.0.3.</span> <span class="nav-text">更新一波原理：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#搜了一下png8和png-24的区别："><span class="nav-number">0.0.4.</span> <span class="nav-text">搜了一下png8和png-24的区别：</span></a></li></ol></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy;  2017 &mdash; 
  <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">OBKoro1</span>

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
      <span class="post-meta-item-text">Site words total count&#58;</span>
    
    <span title="Site words total count">
      156.0k
    </span>
  
</div>




<div>
<script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span class="site-uv"><i class="fa fa-user"></i> 访问用户： <span class="busuanzi-value" id="busuanzi_value_site_uv">21621</span> 人 </span>
<span class="site-pv"><i class="fa fa-eye"></i> 访问次数： <span class="busuanzi-value" id="busuanzi_value_site_pv">68503</span> 次</span>

</div>



        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

  
  <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.2"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.2"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.2"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.2"></script>



  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.2"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.2"></script>


  

  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.2"></script>



  


  




	





  





  








  



  





  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
  <script>AV.initialize("9ANFp60h6oVyxIPGlau3NOA4-gzGzoHsz", "tMdNuKMbFtN4QsekeNVu83TV");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  

  

  

</body>
</html>

